(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/work/contract/select-template" ], {
    2387: function(t, e, n) {
        n.r(e);
        var o, c = n("56ec"), i = n.n(c);
        for (o in c) "default" !== o && function(t) {
            n.d(e, t, function() {
                return c[t];
            });
        }(o);
        e.default = i.a;
    },
    "4f80": function(t, e, n) {},
    "56ec": function(t, o, c) {
        (function(e) {
            function n(e, t) {
                var n, o = Object.keys(e);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(e), t && (n = n.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })), o.push.apply(o, n)), o;
            }
            Object.defineProperty(o, "__esModule", {
                value: !0
            });
            var t = {
                components: {},
                data: function() {
                    return {
                        list: [],
                        isLoading: 1,
                        searchKey: ""
                    };
                },
                computed: function(o) {
                    for (var t = 1; t < arguments.length; t++) {
                        var c = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? n(Object(c), !0).forEach(function(t) {
                            var e, n;
                            e = o, t = c[n = t], n in e ? Object.defineProperty(e, n, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : e[n] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(c)) : n(Object(c)).forEach(function(t) {
                            Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(c, t));
                        });
                    }
                    return o;
                }({}, (o.default = void 0, c("26cb").mapState)({
                    basicSet: function(t) {
                        return t.init.basicSet;
                    }
                })),
                onLoad: function() {},
                onShow: function() {
                    this.init();
                },
                onReady: function() {},
                methods: {
                    init: function() {
                        this.get_template_list();
                    },
                    get_template_list: function() {
                        var e = this;
                        e.$api("work.get_template_list", {
                            key: e.searchKey
                        }).then(function(t) {
                            0 === t.errno ? e.list = t.data.list : e.$tools.toast(t.msg);
                        });
                    },
                    search: function() {
                        this.get_template_list();
                    },
                    pre_see: function(t) {
                        e.showLoading({
                            mask: !0,
                            title: "正在加载中"
                        }), this.$api("contract.template_see", {
                            template_id: t
                        }).then(function(t) {
                            0 == t.errno && (t = t.data.url, e.downloadFile({
                                url: t,
                                success: function(t) {
                                    t = t.tempFilePath;
                                    e.openDocument({
                                        filePath: t,
                                        showMenu: !0,
                                        success: function(t) {
                                            console.log("打开成功");
                                        },
                                        fail: function(t) {
                                            console.log(t);
                                        }
                                    });
                                },
                                fail: function(t) {
                                    console.log(t);
                                },
                                complete: function(t) {
                                    e.hideLoading();
                                }
                            }));
                        });
                    },
                    select: function(t) {
                        var e = getCurrentPages();
                        (e[e.length - 1].$vm, e[e.length - 2].$vm).template = t, this.$Router.back();
                    }
                }
            };
            o.default = t;
        }).call(this, c("543d").default);
    },
    6173: function(t, e, n) {
        n.d(e, "b", function() {
            return o;
        }), n.d(e, "c", function() {
            return c;
        }), n.d(e, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, c = [];
    },
    "92e9": function(t, e, n) {
        n.r(e);
        var o, c = n("6173"), i = n("2387");
        for (o in i) "default" !== o && function(t) {
            n.d(e, t, function() {
                return i[t];
            });
        }(o);
        n("96e5");
        var r = n("f0c5"), c = Object(r.a)(i.default, c.b, c.c, !1, null, null, null, !1, c.a, void 0);
        e.default = c.exports;
    },
    "96e5": function(t, e, n) {
        var o = n("4f80");
        n.n(o).a;
    },
    b60c: function(t, e, o) {
        (function(t) {
            o("767a"), n(o("66fd"));
            var e = n(o("92e9"));
            function n(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = o, t(e.default);
        }).call(this, o("543d").createPage);
    }
}, [ [ "b60c", "common/runtime", "common/vendor" ] ] ]);